﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;

namespace DAO
{
    public class DataProvider
    {
        private static string database;

        public static void SetDatabase(string data)
        {
            database = data;
        }

        public static SqlConnection ConnectDB()
        {          
            string connectionString = "Data Source=.\\SQLEXPRESS;Initial Catalog=" + database + ";Integrated Security=True";
            SqlConnection conn = new SqlConnection(connectionString);
            conn.Open();
            return conn;
        }       
    }
}
